package com.javastudy.basis.timezone;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * Created by xuzhike on 2017/7/8.
 */
public class TimeZoneTest {
    public static void main(String[] args) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:SS");
        String sTime = "2017-07-07 00:00:00";
        Date time = sdf.parse(sTime);
        Calendar cd = Calendar.getInstance();
        cd.setTime(time);
        cd.add(Calendar.DATE, 7);
        time = cd.getTime();
        System.out.println(sdf.format(time));
    }
}
